---
layout: api
page_title: /sys/internal/ui/namespaces - HTTP API
description: >-
  The `/sys/internal/ui/namespaces` endpoint exposes namespaces to the GUI.
---

> [!IMPORTANT]  
> **Documentation Update:** Product documentation, which were located in this repository under `/website`, are now located in [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs), colocated with all other product documentation. Contributions to this content should be done in the `web-unified-docs` repo, and not this one. Changes made to `/website` content in this repo will not be reflected on the developer.hashicorp.com website.

# `/sys/internal/ui/namespaces`

The `/sys/internal/ui/namespaces` endpoint returns the namespaces that the current user has access to.

The namespaces endpoint is an authenticated endpoint used internally by the
Vault GUI to return all namespaces associated with the provided token. You do
not need to explicitly grant capabilities on the `/sys/internal/ui/namespaces`
path in your policy. For more information about namespace policies, see the
[sys/namespaces API documentation](/vault/api-docs/system/namespaces).

Internal endpoints are not intended for general use and make no guarantees on
backwards compatibility over time.

## Get namespaces

List namespaces associated with the provided Vault token for use in the GUI.

| Method | Path                             |
| :----- | :------------------------------- |
| `GET`  | `/sys/internal/ui/namespaces` |

### Sample request

```shell-session
$ curl \
    --header "X-Vault-Token: ..." \
    --request GET \
    http://127.0.0.1:8200/v1/sys/internal/ui/namespaces
```

### Sample response

```json
{
    "request_id": "28a1ca80-cc97-913d-8ed2-844ea501ae0d",
    "lease_id": "",
    "renewable": false,
    "lease_duration": 0,
    "data": {
        "keys": [
            "software/",
            "software/eng/",
            "software/eng/dev/",
            "software/eng/qc/",
            "devops/"
        ]
    },
    "wrap_info": null,
    "warnings": null,
    "auth": null,
    "mount_type": ""
}
```

The `keys` array in the response lists all available namespaces, with each entry representing a namespace path.

In the sample response above:
- `software/` is a namespace that contains a nested namespace `eng/`.
- `software/eng/` is a nested namespace under `software/` and contains its own nested namespaces `dev/` and `qc/`.
- `software/eng/dev/` is a nested namespace under `software/eng/`.
- `software/eng/qc/` is a nested namespace under `software/eng/`.
- `devops/` is a namespace that does not have any nested namespaces.

> **Note:** The `root` namespace is never included in this list of namespaces.
